<script>
$(function(){
	$('#examine_2').click(function(){
	    $('#account_status').val(2);
	    $('#doaccount_form').submit();
	});
	$('#examine_3').click(function(){
	    $('#account_status').val(3);
	    $('#doaccount_form').submit();
	});
});
</script>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="guide">
	<tr>
		<td>
			<span style="float: left;">后台管理中心&nbsp;&raquo;&nbsp;产品管理</span>
			<span style="float: right;">
				<a href="javascript:history.go(-1);">&lt;- 返回</a>
			</span>
		</td>
	</tr>
</table>

<form action="./?controller=account&action=accountdoadd" method="post" id="doaccount_form">
<input type="hidden" name="id" value="<?php echo $this->account['id'];?>" />
<input type="hidden" name="status" id="account_status" value="0" />
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
	<tr class="header">
		<td colspan="11">账号信息(标*号的必填)</td>
	</tr>
	<tr>
		<td class="altbg1">所属产品 *</td>
		<td class="altbg2">
			<select name="pid">
<?php 
foreach ($this->product as $v){
    $selected = $v['id'] == $this->account['pid'] ? 'selected' : '';
    echo <<<EOF
                <option value="{$v['id']}" {$selected}>{$v['name']}</option>
EOF;
}
?>
			</select>
		</td>
	</tr>
	<tr>
		<td class="altbg1">用户名 *</td>
		<td class="altbg2">
			<input class="input" name="username" value="<?php echo $this->account['username'];?>" />
		</td>
	</tr>
	<tr>
		<td class="altbg1">密码 *</td>
		<td class="altbg2">
			<input class="input" name="password" value="<?php echo $this->account['password'];?>" />
		</td>
	</tr>
	<tr>
		<td class="altbg1">微信号 *</td>
		<td class="altbg2">
			<input class="input" name="wechat" value="<?php echo $this->account['wechat'];?>" />
		</td>
	</tr>
	<tr>
		<td class="altbg1">显示人数 *</td>
		<td class="altbg2">
			<input class="input" name="nums_show" value="<?php echo $this->account['nums_show'];?>" />
		</td>
	</tr>
	<tr>
		<td class="altbg1">实际可购买人数 *</td>
		<td class="altbg2">
			<input class="input" name="nums_value" value="<?php echo $this->account['nums_value'];?>" />
			<div>已买人数：<?php echo $this->account['nums_stock'];?>。</div>
		</td>
	</tr>
	<tr>
		<td class="altbg1" colspan=2 align="center">
<?php 
if($this->account['status'] == 1){
    echo '<input class="button" type="button" id="examine_2" value="审核通过" />
    &nbsp;
    <input class="button" type="button" id="examine_3" value="审核不通过" />
    &nbsp;
    ';
}
?>
			<input class="button" type="submit" value="修改" />
			&nbsp;
			<input class="button" type="reset" value="重置" />
		</td>
	</tr>
</table>
</form>
